function Header(){
    this.createDom();
}
//头部与左侧模板
Header.NavTemplate = `
<nav class="navbar navbar-inverse" style="margin-bottom: 0; background:#435162;">
  
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">图书管理系统</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                  
          <ul class="nav navbar-nav navbar-right">
            <li data-toggle="modal" data-target="#logModal"><a href="#">登录</a></li>
            <li data-toggle="modal" data-target="#regModal"><a href="#">注册</a></li>
          </ul>
          <ul class="nav navbar-nav navbar-right hidden login-success">
            <li><a href="#">欢迎：</a></li>
            <li><a href="javascript:void(0);" class="link-logout">注销</a></li>
          </ul>
        </div><!-- /.navbar-collapse -->

      </nav>
      <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true" style="width: 200px;
            text-align:center; height: 840px; background: #435162; float:left;">
    <div class="panel panel-default">
      <div class="panel-heading" role="tab" id="headingOne">
        <h4 class="panel-title">
          <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
            书籍管理
          </a>
        </h4>
      </div>
      <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
        <div class="panel-body">
          <div >图书信息</div>

        </div>

      </div>
    </div>
    <div class="panel panel-default">
      <div class="panel-heading" role="tab" id="headingTwo">
        <h4 class="panel-title">
          <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
            用户管理
          </a>
        </h4>
      </div>
      <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
        <div class="panel-body">
          用户信息
        </div>
      </div>
    </div>
    <div class="panel panel-default">
      <div class="panel-heading" role="tab" id="headingThree">
        <h4 class="panel-title">
          <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
            仓库管理
          </a>
        </h4>
      </div>
      <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
        <div class="panel-body">
          <a href="html/store.html">库存状态</a>
        </div>
        <div class="panel-body">
          <a href="html/business.html">供应商信息</a>
        </div>
      </div>   
    </div>
    <div class="panel panel-default">
          <div class="panel-heading" role="tab" id="headingFour">
            <h4 class="panel-title">
              <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFour" aria-expanded="false" aria-controls="collapseFour">
                借还管理
              </a>
            </h4>
          </div>
          <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour">
            <div class="panel-body">
              借书
            </div>
            <div class="panel-body">
              还书
            </div>
          </div>
    </div>
    <div class="panel panel-default">
          <div class="panel-heading" role="tab" id="headingSix">
            <h4 class="panel-title">
              <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSix" aria-expanded="false" aria-controls="collapseSix">
                系统管理
              </a>
            </h4>
          </div>
          <div id="collapseSix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSix">
            <div class="panel-body">
              退出系统
            </div>
            <div class="panel-body">
              提出建议
            </div>
          </div>
    </div>
  </div>
  
`;
$.extend(Header.prototype,{
    //创建元素
    createDom(){
        $("header").html(Header.NavTemplate);
        console.log("123");
    }
});

new Header();
